import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    name: 'dashboard',
                    component: resolve => require(['../components/page/Dashboard.vue'], resolve),
                    meta: { title: '综合首页' }
                },
                {
                    path: '/classification',
                    name: 'classification',
                    component: resolve => require(['../components/page/educate/classification.vue'], resolve),
                    meta: { title: '安全教育分类' }
                },
                {
                    path: '/questionBank',
                    name: 'questionBank',
                    component: resolve => require(['../components/page/educate/questionBank.vue'], resolve),
                    meta: { title: '安全教育题库' }
                },
                {
                    path: '/testpaper',
                    name: 'testpaper',
                    component: resolve => require(['../components/page/educate/testpaper.vue'], resolve),
                    meta: { title: '安全教育试卷' }
                },
                {
                    path: '/educationStatistics',
                    name: 'educationStatistics',
                    component: resolve => require(['../components/page/educate/educationStatistics.vue'], resolve),
                    meta: { title: '安全教育统计' }
                },

                {
                    path: '/cloudInspection',
                    name: 'cloudInspection',
                    component: resolve => require(['../components/page/cloudInspection.vue'], resolve),
                    meta: { title: '云端巡查管理' }
                },
                {
                    path: '/infomation',
                    name: 'infomation',
                    component: resolve => require(['../components/page/news/infomation.vue'], resolve),
                    meta: { title: '消息管理' }
                },
                {
                    path: '/logmanagement',
                    name: 'logmanagement',
                    component: resolve => require(['../components/page/logmanagement.vue'], resolve),
                    meta: { title: '日志管理' }
                },
                {
                    path: '/column',
                    name: 'column',
                    component: resolve => require(['../components/page/news/column.vue'], resolve),
                    meta: { title: '栏目管理' }
                },

                {
                    path: '/policeManage',
                    name: 'policeManage',
                    component: resolve => require(['../components/page/policeManage.vue'], resolve),
                    meta: { title: '民警管理' }
                },
                {
                    path: '/companyManage',
                    name: 'companyManage',
                    component: resolve => require(['../components/page/companyManage.vue'], resolve),
                    meta: { title: '劳务公司管理' }
                },
                {
                    path: '/allPerson',
                    name: 'allPerson',
                    component: resolve => require(['../components/page/allPerson.vue'], resolve),
                    meta: { title: '全部人员' }
                },
                {
                    path: '/nointerview',
                    name: 'nointerview',
                    component: resolve => require(['../components/page/nointerview.vue'], resolve),
                    meta: { title: '未面试' }
                },
                {
                    path: '/pendingpeople',
                    name: 'pendingpeople',
                    component: resolve => require(['../components/page/pendingpeople.vue'], resolve),
                    meta: { title: '待定人员' }
                },
                {
                    path: '/offendpeople',
                    name: 'offendpeople',
                    component: resolve => require(['../components/page/offendpeople.vue'], resolve),
                    meta: { title: '违纪人员' }
                },
                {
                    path: '/laborer',
                    name: 'laborer',
                    component: resolve => require(['../components/page/laborer.vue'], resolve),
                    meta: { title: '待入职' }
                },
                {
                    path: '/onjob',
                    name: 'onjob',
                    component: resolve => require(['../components/page/onjob.vue'], resolve),
                    meta: { title: '在职人员' }
                },
                {
                    path: '/jobwhitelist',
                    name: 'jobwhitelist',
                    component: resolve => require(['../components/page/jobwhitelist.vue'], resolve),
                    meta: { title: '在职白名单' }
                },
                {
                    path: '/checkOut',
                    name: 'checkOut',
                    component: resolve => require(['../components/page/checkOut.vue'], resolve),
                    meta: { title: '离宿人员' }
                },
                {
                    path: '/resign',
                    name: 'resign',
                    component: resolve => require(['../components/page/resign.vue'], resolve),
                    meta: { title: '离职人员' }
                },
                {
                    path: '/backcheck',
                    name: 'backcheck',
                    component: resolve => require(['../components/page/backcheck.vue'], resolve),
                    meta: { title: '风险评估' }
                },
                {
                    path: '/pendinginterview',
                    name: 'pendinginterview',
                    component: resolve => require(['../components/page/pendinginterview.vue'], resolve),
                    meta: { title: '待面试' }
                },

                {
                    path: '/speed',
                    name: 'speed',
                    component: resolve => require(['../components/page/speed.vue'], resolve),
                    meta: { title: '备案登记' }
                },
                {
                    path: '/outsourcing',
                    name: 'outsourcing',
                    component: resolve => require(['../components/page/outsourcing.vue'], resolve),
                    meta: { title: '外协人员备案登记' }
                },
                {
                    path: '/allSourcing',
                    name: 'allSourcing',
                    component: resolve => require(['../components/page/allSourcing.vue'], resolve),
                    meta: { title: '外协人员' }
                },
                {
                    path: '/patrolStatistics',
                    name: 'patrolStatistics',
                    component: resolve => require(['../components/page/patrolStatistics.vue'], resolve),
                    meta: { title: '云端巡查统计' }
                },
                {
                    path: '/peopleStatistics',
                    name: 'peopleStatistics',
                    component: resolve => require(['../components/page/peopleStatistics.vue'], resolve),
                    meta: { title: '人员统计' }
                },
                {
                    path: '/enterpriseStatistics',
                    name: 'enterpriseStatistics',
                    component: resolve => require(['../components/page/enterpriseStatistics.vue'], resolve),
                    meta: { title: '企业统计' }
                },
                {
                    path: '/bankcard',
                    name: 'bankcard',
                    component: resolve => require(['../components/page/bankcard.vue'], resolve),
                    meta: { title: '银行办卡' }
                },
                {
                    path: '/representativeManage',
                    name: 'representativeManage',
                    component: resolve => require(['../components/page/representativeManage.vue'], resolve),
                    meta: { title: '驻厂代表管理' }
                },
                {
                    path: '/usermanager',
                    name: 'usermanager',
                    component: resolve => require(['../components/page/sysmanager/usermanager.vue'], resolve),
                    meta: { title: '用户管理' }
                },
                {
                    path: '/miniuser',
                    name: 'miniuser',
                    component: resolve => require(['../components/page/sysmanager/miniuser.vue'], resolve),
                    meta: { title: '小程序管理' }
                },
                {
                    path: '/rolemanager',
                    name: 'rolemanager',
                    component: resolve => require(['../components/page/sysmanager/rolemanager.vue'], resolve),
                    meta: { title: '角色管理' }
                },
                {
                    path: '/uploadAttachment',
                    name: 'uploadAttachment',
                    component: resolve => require(['../components/page/sysmanager/uploadAttachment.vue'], resolve),
                    meta: { title: '附件管理' }
                },
                {
                    path: '/taskList',
                    name: 'taskList',
                    component: resolve => require(['../components/page/taskList.vue'], resolve),
                    meta: { title: '任务列表' }
                },
                {
                    path: '/taskCensus',
                    name: 'taskCensus',
                    component: resolve => require(['../components/page/taskCensus.vue'], resolve),
                    meta: { title: '任务统计' }
                },
                {
                    path: '/businessManage',
                    name: 'businessManage',
                    component: resolve => require(['../components/page/businessManage.vue'], resolve),
                    meta: { title: '企业管理' }
                },
                {
                    path: '/bussinessConsult',
                    name: 'bussinessConsult',
                    component: resolve => require(['../components/page/bussinessConsult.vue'], resolve),
                    meta: { title: '企业维权微服务' }
                },
                {
                    path: '/laborconsulting',
                    name: 'laborconsulting',
                    component: resolve => require(['../components/page/laborconsulting.vue'], resolve),
                    meta: { title: '劳动维权微服务' }
                },
                {
                    path: '/meeting',
                    name: 'meeting',
                    component: resolve => require(['../components/page/recruitment/meeting.vue'], resolve),
                    meta: { title: '招聘会' }
                },
                {
                    path: '/talentResume',
                    name: 'talentResume',
                    component: resolve => require(['../components/page/recruitment/talentResume.vue'], resolve),
                    meta: { title: '人才简历' }
                },
                {
                    path: '/postdetails',
                    name: 'postdetails',
                    component: resolve => require(['../components/page/recruitment/postdetails.vue'], resolve),
                    meta: { title: '岗位' }
                },
                {
                    path: '/companyProfile',
                    name: 'companyProfile',
                    component: resolve => require(['../components/page/recruitment/companyProfile.vue'], resolve),
                    meta: { title: '企业介绍' }
                },
                {
                    path: '/consultationManage',
                    name: 'consultationManage',
                    component: resolve => require(['../components/page/consultationManage.vue'], resolve),
                    meta: { title: '咨询管理' }
                },
                {
                    path: '/infoManage',
                    name: 'infoManage',
                    component: resolve => require(['../components/page/infoManage.vue'], resolve),
                    meta: { title: '信息管理' }
                },
                {
                    path: '/dailyManage',
                    name: 'dailyManage',
                    component: resolve => require(['../components/page/dailyManage.vue'], resolve),
                    meta: { title: '日志管理' }
                },
                {
                    path: '/icon',
                    name: 'icon',
                    component: resolve => require(['../components/page/Icon.vue'], resolve),
                    meta: { title: '自定义图标' }
                },
                {
                    path: '/table',
                    name: 'table',
                    component: resolve => require(['../components/page/BaseTable.vue'], resolve),
                    meta: { title: '基础表格' }
                },
                {
                    path: '/tabs',
                    name: 'tabs',
                    component: resolve => require(['../components/page/Tabs.vue'], resolve),
                    meta: { title: 'tab选项卡' }
                },
                {
                    path: '/form',
                    name: 'form',
                    component: resolve => require(['../components/page/BaseForm.vue'], resolve),
                    meta: { title: '基本表单' }
                },
                {
                    // 富文本编辑器组件
                    path: '/editor',
                    name: 'editor',
                    component: resolve => require(['../components/page/VueEditor.vue'], resolve),
                    meta: { title: '富文本编辑器' }
                },
                {
                    // markdown组件
                    path: '/markdown',
                    name: 'markdown',
                    component: resolve => require(['../components/page/Markdown.vue'], resolve),
                    meta: { title: 'markdown编辑器' }
                },
                {
                    // 图片上传组件
                    path: '/upload',
                    name: 'upload',
                    component: resolve => require(['../components/page/Upload.vue'], resolve),
                    meta: { title: '文件上传' }
                },
                {
                    // vue-schart组件
                    path: '/charts',
                    name: 'charts',
                    component: resolve => require(['../components/page/BaseCharts.vue'], resolve),
                    meta: { title: 'schart图表' }
                },
                {
                    // 拖拽列表组件
                    path: '/drag',
                    name: 'drag',
                    component: resolve => require(['../components/page/DragList.vue'], resolve),
                    meta: { title: '拖拽列表' }
                },
                {
                    // 拖拽Dialog组件
                    path: '/dialog',
                    name: 'dialog',
                    component: resolve => require(['../components/page/DragDialog.vue'], resolve),
                    meta: { title: '拖拽弹框' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    name: 'permission',
                    component: resolve => require(['../components/page/Permission.vue'], resolve),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    path: '/404',
                    name: '404',
                    component: resolve => require(['../components/page/404.vue'], resolve),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    name: '403',
                    component: resolve => require(['../components/page/403.vue'], resolve),
                    meta: { title: '403' }
                },
                {
                    path: '/admin',
                    name: 'admin',
                    component: resolve => require(['../components/page/admin.vue'], resolve),
                    meta: { title: '用户信息' }
                }
            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
})
